package edu.spbsu.nonsm00th.model;

import edu.spbsu.nonsm00th.util.Precondition;

/**
 * Plane representation class.
 *
 * @author mukhadin
 */
public class Plane {

    private Point a;
    private Point b;
    private Point c;
    private int dimension;

    public Plane(Point a, Point b, Point c) {
        Precondition.argsNotNull(a, b, c);
        Precondition.check(a.getDimension() == b.getDimension() && b.getDimension() == c.getDimension(),
                "Dimensions of Points a, b and c should be equal.");
        this.a = a;
        this.b = b;
        this.c = c;
        this.dimension = a.getDimension();
    }

    public Point getA() {
        return a;
    }

    public void setA(Point a) {
        this.a = a;
    }

    public Point getB() {
        return b;
    }

    public void setB(Point b) {
        this.b = b;
    }

    public Point getC() {
        return c;
    }

    public void setC(Point c) {
        this.c = c;
    }

    public int getDimension() {
        return dimension;
    }

    public void setDimension(int dimension) {
        this.dimension = dimension;
    }

}
